
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpCemChart.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpCemChartForm"
 */
public class CcpCemChartForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cccGuid = null;
   private java.lang.String _cccName = null;
   private java.lang.String _cccCode = null;
   private java.lang.String _remark = null;
   private java.lang.String _cgnGuid = null;
   private java.lang.String _ccoGuid = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;
   private java.lang.String _reserved4 = null;
   private java.lang.String _reserved5 = null;

   /**
    * Standard constructor.
    */
   public CcpCemChartForm() {
   }

   /**
    * Returns the cccGuid
    *
    * @return the cccGuid
    */
   public java.lang.String getCccGuid() {
      return _cccGuid;
   }

   /**
    * Sets the cccGuid
    *
    * @param cccGuid the new cccGuid value
    */
   public void setCccGuid(java.lang.String cccGuid) {
      _cccGuid = cccGuid;
   }
   /**
    * Returns the cccName
    *
    * @return the cccName
    */
   public java.lang.String getCccName() {
      return _cccName;
   }

   /**
    * Sets the cccName
    *
    * @param cccName the new cccName value
    */
   public void setCccName(java.lang.String cccName) {
      _cccName = cccName;
   }
   /**
    * Returns the cccCode
    *
    * @return the cccCode
    */
   public java.lang.String getCccCode() {
      return _cccCode;
   }

   /**
    * Sets the cccCode
    *
    * @param cccCode the new cccCode value
    */
   public void setCccCode(java.lang.String cccCode) {
      _cccCode = cccCode;
   }
   /**
    * Returns the remark
    *
    * @return the remark
    */
   public java.lang.String getRemark() {
      return _remark;
   }

   /**
    * Sets the remark
    *
    * @param remark the new remark value
    */
   public void setRemark(java.lang.String remark) {
      _remark = remark;
   }
   /**
    * Returns the cgnGuid
    *
    * @return the cgnGuid
    */
   public java.lang.String getCgnGuid() {
      return _cgnGuid;
   }

   /**
    * Sets the cgnGuid
    *
    * @param cgnGuid the new cgnGuid value
    */
   public void setCgnGuid(java.lang.String cgnGuid) {
      _cgnGuid = cgnGuid;
   }
   /**
    * Returns the ccoGuid
    *
    * @return the ccoGuid
    */
   public java.lang.String getCcoGuid() {
      return _ccoGuid;
   }

   /**
    * Sets the ccoGuid
    *
    * @param ccoGuid the new ccoGuid value
    */
   public void setCcoGuid(java.lang.String ccoGuid) {
      _ccoGuid = ccoGuid;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }
   /**
    * Returns the reserved4
    *
    * @return the reserved4
    */
   public java.lang.String getReserved4() {
      return _reserved4;
   }

   /**
    * Sets the reserved4
    *
    * @param reserved4 the new reserved4 value
    */
   public void setReserved4(java.lang.String reserved4) {
      _reserved4 = reserved4;
   }
   /**
    * Returns the reserved5
    *
    * @return the reserved5
    */
   public java.lang.String getReserved5() {
      return _reserved5;
   }

   /**
    * Sets the reserved5
    *
    * @param reserved5 the new reserved5 value
    */
   public void setReserved5(java.lang.String reserved5) {
      _reserved5 = reserved5;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCccGuid() == null) {
         errors.add("cccGuid", new ActionError("error.cccGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
